package com.github.edu.db.manager.config.service.impl;

import com.github.admin.edu.assembly.string.util.StringUtils;
import com.github.admin.edu.orm.serivce.impl.DataRestfulAbstractBaseService;
import com.github.edu.db.manager.config.entity.TSysTableField;
import com.github.edu.db.manager.config.service.TableFieldManagerService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * Create by IntelliJ IDEA
 * 用户：王建
 * 日期：2018-7-30
 */
@Service
public class TableFieldManagerServiceImpl extends
        DataRestfulAbstractBaseService<TSysTableField,String> implements TableFieldManagerService {


    @Transactional
    public String delete(String ids) {
        return super.delete(ids,"String");

    }

    @Override
    public String getAllGetEntity(String title, Integer current, Integer rows, String order, String fileId) {
        TSysTableField tableManager=new TSysTableField();
        if(StringUtils.isNotBlank(title)){
            tableManager.setTableName(title);
        }
        return super.getAllGetEntity(tableManager,current,rows,order,fileId);
    }

    @Override
    public String getAllEntity(String title, String order, String fileId) {
        return getAllGetEntity(title,0,0,order,fileId);
    }

    @Override
    public String saveOrUpdate(String jsonEntity) {
        return null;
    }
}
